﻿using System;
using System.Collections.Generic;
using CompactMapper.Orm.Queries;

namespace CompactMapper.Orm.Contracts
{
    public interface IUnitOfWorkForRepository<T> : IDisposable
        where T : IKeyedPersistent
    {
        void MakePersistent(T o);
        void MakePersistent(IEnumerable<T> o);
        IEnumerable<T> GetAll();
        IEnumerable<T> GetByQuery(Query<T> query);
        void DeleteAll();
    }
}